'use strict';


function compute_average(collection) {
  var arr;
  
  for(let item of collection){
   
  var a=collection.reduce( function (total,item){
    return total + item;}
    ,0);
    
     arr=a/collection.length;
  }

console.log(arr);
return arr;  //在这里写入代码
}

module.exports = compute_average;

